#!/bin/sh
process=p_capture

### BEGIN INIT INFO
# Provides:          p_capture
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop packet_capture
# Description:       Enable service provided by p_capture.
### END INIT INFO

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin
. /lib/lsb/init-functions

case "$1" in
  start)
        log_daemon_msg "Starting check Vlan and start cptrue"
        packet_capture.sh "start"
    ;;
  stop)
        log_daemon_msg "starting check Vlan and stop cptrue, and del vlan interface"
        packet_capture.sh "stop"
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: /etc/init.d/p_capture {start|stop|restart}"
    exit 1
    ;;
esac

exit 0
